﻿using SanlieHash;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AuthCenter.Tools.Password
{
    public static class PasswordCheck
    {
        public static bool Vertify(string password, string checkpassword, string way)
        {
            switch (way)
            {
                case "md6":
                    return FastHash.GetMD6(checkpassword.Substring(0, 8) + password) == checkpassword;
                case "md5":
                    return FastHash.GetMD5(checkpassword.Substring(0, 8) + password) == checkpassword;
                default:
                    return false;
            }
        }
    }
}
